package com.tulingxueyuan.ribbon;

import com.netflix.loadbalancer.ILoadBalancer;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.management.MXBean;

/**
 * @author :tangweiliang
 * @date : 2023/1/28 22:56
 * 未来的你会感谢现在努力的自己
 */
@Configuration
public class RibbonRandomRuleConfig {

    // 方法名必须叫iRule
    @Bean
    public IRule iRule(){
        return new RandomRule();
        }
    }
